<#--    -->
<#if ctrl.getPortletType() != 'CONTAINER'>
<#assign content>
  <#if (ctrl.getHeight?? && ctrl.getHeight() gte 0)>
    :height="${ctrl.getHeight()?c}"
  </#if>
  <#if (ctrl.getWidth?? && ctrl.getWidth() gte 0)>
    :width="${ctrl.getWidth()?c}"
  </#if>
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
</#ibizinclude>
<#else>
  <div class='portlet-container ${srffilepath2(ctrl.getCodeName())} <#if ctrl.getPSSysCss()??> ${ctrl.getPSSysCss().getCssName()}</#if>' :style="{<#if (ctrl.getHeight?? && ctrl.getHeight() gt 0)>'height': '${ctrl.getHeight()?c}px',</#if><#if (ctrl.getWidth?? && ctrl.getWidth() gt 0)>'width': '${ctrl.getWidth()?c}px '</#if>}">
  <#--  BEGIN：容器Flex布局-前  -->
  <#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
      <div style = 'display : flex; <#if ctrl.getFlexAlign()??> justify-content :${ctrl.getFlexAlign()};</#if> <#if ctrl.getFlexDir()??> flex-direction:${ctrl.getFlexDir()};</#if> <#if ctrl.getFlexVAlign()??>align-items:${ctrl.getFlexVAlign()};</#if>'>
  <#else>
      <row>
  </#if>
  <#--  END：容器Flex布局-前  -->
  <#list ctrl.getPSPortlets() as portlet><#t>
    <#if portlet.getPortletType?? && portlet.getPortletType()??><#t>
      <#--  BEGIN：获取父的layout，自己的LayoutPos  -->  
      <#assign layout=ctrl.getLayoutMode()>
      <#assign LayoutPos = portlet.getPSLayoutPos()>
      <#--  END：获取父的layout，自己的LayoutPos  --> 
        <#--  BEGIN：子门户部件绘制，栅格绘制  -->
        <#if layout == 'TABLE_12COL'>
          <#assign multiple = 2/>
        <#else>
          <#assign multiple = 1/>
        </#if>
        <#macro format_numer num>
          <#if num lt 0 >
            0<#t>
          <#elseif num gt 24>
            24<#t>
          <#else>
            ${num}<#t>
          </#if>
        </#macro>
        <#if (layout == 'TABLE_24COL' || layout == 'TABLE_12COL') && LayoutPos??><#t>
        <i-col<#if LayoutPos.getColXS() != -1> :xs="{ span: <@format_numer LayoutPos.getColXS()*multiple/>, offset: <#if LayoutPos.getColXSOffset() != -1><@format_numer LayoutPos.getColXSOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColSM() != -1> :sm="{ span: <@format_numer LayoutPos.getColSM()*multiple />, offset: <#if LayoutPos.getColSMOffset() != -1><@format_numer LayoutPos.getColSMOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColMD() != -1> :md="{ span: <@format_numer LayoutPos.getColMD()*multiple />, offset: <#if LayoutPos.getColMDOffset() != -1><@format_numer LayoutPos.getColMDOffset()*multiple /><#else>0</#if> }"</#if><#if LayoutPos.getColLG() != -1> :lg="{ span: <@format_numer LayoutPos.getColLG()*multiple />, offset: <#if LayoutPos.getColLGOffset() != -1><@format_numer LayoutPos.getColLGOffset()*multiple /><#else>0</#if> }"</#if>>
            <div class="portlet-without-title">
              <card class="portlet-card" :bordered="false" dis-hover :padding="0">
                <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
                <#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle() != 'DEFAULT'>
                  <a slot='extra'></a>
                <#else>
                <p slot='title'>
                  ${portlet.getTitle()}
                  <span class="line"></span>
                </p>
                <a slot='extra'></a>
              </#if>
                </#if> 
                <span>
                  <@ibizindent blank=14><#t>
                  ${P.getCtrlCode(portlet, 'CONTROL.html').code}
                  </@ibizindent>
                </span>
              </card>
            </div>
        </i-col>
        <#--  BEGIN：子门户部件绘制,Flex  -->
        <#else>
        <div class="portlet-without-title">
          <card class="portlet-card" :bordered="false" dis-hover :padding="0">
            <#if portlet.getPortletType() == 'CONTAINER' && portlet.isShowTitleBar() && portlet.getTitle()?has_content>
            <#if view.getViewStyle?? && view.getViewStyle()?? && view.getViewStyle() != 'DEFAULT'>
              <a slot='extra'></a>
            <#else>
              <p slot='title'>
                ${portlet.getTitle()}
                <span class="line"></span>
              </p>
              <a slot='extra'></a>
            </#if>
            </#if> 
            <span>
              <@ibizindent blank=14><#t>
              ${P.getCtrlCode(portlet, 'CONTROL.html').code}
              </@ibizindent>
            </span>
          </card>
        </div>
        </#if>
        <#--  END：子门户部件绘制  -->
    </#if>
  </#list>
  <#--  BEGIN：容器Flex布局-后  -->
  <#if ctrl.getLayoutMode?? && ctrl.getLayoutMode() == 'FLEX'>
      </div>
  <#else>
      </row>
  </#if>
  <#--  END：容器Flex布局-后  -->
  </div>
</#if>